/************************************************************************************
 RC Hobby Stream
 Twitter automatic feeder

 First version developed with support of Mapelgate Media

"RC Hobby Stream" is protected by the copyright law
© 2011 Enrico Miglino / Tech Consulting (enrico.miglino@ovi.com)
Distributed under the LGPL 3.0 license.

This file is part of "RC Hobby Stream".

    "RC Hobby Stream" is free software: you can redistribute it
    and/or modify it under the terms of the Lesser GNU General Public License
    as published by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "RC Hobby Stream" is distributed in the hope that it
    will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    Lesser GNU General Public License for more details.

    You should have received a copy of the Lesser GNU General Public License
    along with "RC Hobby Stream".
    If not, see <http://www.gnu.org/licenses/>.
************************************************************************************/

import Qt 4.7

Item {
    id: toolbarMail    // Options toolbar for the user setup

    width: 160; height: 210

    // Aliases fot the parametric text strings
    property alias link1Label: button1.text
    property alias link2Label: button2.text
    property alias link3Label: button3.text
    property alias link4Label: button4.text
    property alias link5Label: button5.text
    property alias title: toolbarTitle.text

    // Signals for all the buttons
    signal button1Clicked
    signal button2Clicked
    signal button3Clicked
    signal button4Clicked
    signal button5Clicked

    // Relative position settings
    property int btnLeftMargin: 5       // Buttons margins
    property int btnVertOffset: 32      // Buttons vertical shift offset
    property int yTitle: 10             // Title vertical position
    property int yStart: 40             // Button top starting position
    property int buttonOptionHeight: 24 // Button show sizes
    property int buttonOptionWidth: 24

    focus:true

    Rectangle {
        id: setupBackground
        width: parent.width; height: parent.height
        color: "#216778"; smooth: true; radius: 15; opacity: 0.8
    }

    Text {
        id: toolbarTitle // Toolbar Title
        color: "#D0D0D0"    // Text color
        anchors.horizontalCenter: parent.horizontalCenter; y: yTitle
        style: Text.Raised; styleColor: "black"
        font.pointSize: 12; font.bold: true
    }

    // Link definitions
    Link {
        id: button1

        height: buttonOptionHeight; width: buttonOptionWidth
        anchors.left: parent.left;
        // Relative vertical top position
        y: parent.yStart;
        // BUtton marginButton
        anchors.leftMargin: parent.btnLeftMargin;

        onClicked: toolbarMail.button1Clicked(); // Event function callback
        focus:true
    }

    Link {
        id: button2

        height: buttonOptionHeight; width: buttonOptionWidth
        anchors.left: parent.left;
        // Relative vertical top position
        y: parent.yStart + parent.btnVertOffset;
        // BUtton margin
        anchors.leftMargin: parent.btnLeftMargin;

        onClicked: toolbarMail.button2Clicked(); // Event function callback
    }

    Link {
        id: button3

        height: buttonOptionHeight; width: buttonOptionWidth
        anchors.left: parent.left;
        // Relative vertical top position
        y: parent.yStart + parent.btnVertOffset * 2;
        // BUtton margin
        anchors.leftMargin: parent.btnLeftMargin;

        onClicked: toolbarMail.button3Clicked(); // Event function callback
    }

    Link {
        id: button4

        height: buttonOptionHeight; width: buttonOptionWidth
        anchors.left: parent.left;
        // Relative vertical top position
        y: parent.yStart + parent.btnVertOffset * 3;
        // BUtton margin
        anchors.leftMargin: parent.btnLeftMargin;

        onClicked: toolbarMail.button4Clicked(); // Event function callback
    }

    Link {
        id: button5

        height: buttonOptionHeight; width: buttonOptionWidth
        anchors.left: parent.left;
        // Relative vertical top position
        y: parent.yStart + parent.btnVertOffset * 4;
        // BUtton margin
        anchors.leftMargin: parent.btnLeftMargin;

        onClicked: toolbarMail.button5Clicked(); // Event function callback
    }
}
